home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / biz / patch / STFax3035Upd.lha / Update STFax < prev    next >
Text File  |  1998-10-08  |  5KB  |  176 lines

  1. ; $VER: STFax-Update 1.5 (11.8.98)
  2. ;
  3. ; Script by Simone Tellini <wiz@pragmanet.it>
  4. ;
  5.  
  6. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  7. ;  set initial variables
  8. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  9.  
  10. (set @app-name     "STFax Professional")
  11. (set OldVersion    "3.0")
  12. (set NewVersion    "3.5")
  13. (set OldFile       "STFax:STFax")
  14. (set OldSize       370772)
  15. (set PatchFile     "STFax.patch")
  16. (set @error-msg    "An unexpected error has occured. Installation aborted.")
  17. (set @default-dest "STFax:")
  18.  
  19. (if (= (exists OldFile (noreq)) 0)
  20.     (if (= (exists (cat OldFile ".old") (noreq)) 0)
  21.         (abort @app-name OldVersion " has not been found!")
  22.         (set OldFile (cat OldFile ".old"))
  23.     )
  24. )
  25.  
  26. (if (<> (getsize OldFile) OldSize)
  27.     (abort @app-name " has a different size than the expected one, "
  28.            "patch can't be applied.\n\n"
  29.            "Make sure you installed the plain 68000 version\n"
  30.            "(the patched one will be a 020+ optimised version anyway)")
  31. )
  32.  
  33. (complete 0)
  34.  
  35. (welcome)
  36.  
  37. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  38. ;  Patch the file
  39. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  40.  
  41. (if (<> OldFile "STFax:STFax.old")
  42.   (
  43.     (if (exists "STFax:STFax.old")
  44.         (delete "STFax:STFax.old")
  45.     )
  46.  
  47.     (rename OldFile "STFax:STFax.old")
  48.  
  49.     (set OldFile (cat OldFile ".old"))
  50.   )
  51. )
  52.  
  53. (complete 20)
  54.  
  55. (working "Applying the patch...")
  56.  
  57. (run (cat "Patch " OldFile " STFax:STFax " PatchFile)
  58.     (prompt "Applying the patch...")
  59. )
  60.  
  61. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  62. ;  Copy printer driver
  63. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  64.  
  65. (if (exists "Devs/Printers/STFaxPrt")
  66.     (copyfiles
  67.         (source "Devs/Printers/STFaxPrt")
  68.         (dest "DEVS:Printers")
  69.     )
  70. )
  71.  
  72. (complete 33)
  73.  
  74. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  75. ;  Copy docs, if they exists
  76. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  77.  
  78. (if (exists "STFax.guide")
  79.     (copyfiles
  80.         (source "STFax.guide")
  81.         (dest "STFax:")
  82.     )
  83. )
  84.  
  85. (complete 35)
  86.  
  87. (if (exists "History.txt")
  88.     (copyfiles
  89.         (source "History.txt")
  90.         (dest "STFax:")
  91.     )
  92. )
  93.  
  94. (complete 40)
  95.  
  96. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  97. ;  Copy modem init strings
  98. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  99.  
  100. (if (exists "Data/ModemInit.cfg")
  101.     (copyfiles
  102.         (source "Data/ModemInit.cfg")
  103.         (dest "STFax:Data")
  104.     )
  105. )
  106.  
  107. (complete 45)
  108.  
  109. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  110. ;  Install new catalogs
  111. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  112.  
  113. (if (exists "Catalogs")
  114.     (copyfiles
  115.         (prompt "Updating catalog files")
  116.         (help @copyfiles-help)
  117.         (source "Catalogs")
  118.         (dest "STFax:Catalogs")
  119.         (choices "italiano")
  120.         (confirm)
  121.     )
  122. )
  123.  
  124. (complete 60)
  125.  
  126. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  127. ;  Copy Textinput.mcc
  128. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  129.  
  130. (if (exists "MUI/Textinput.mcc")
  131.  
  132.     (copylib
  133.            (prompt "Installing updated MUI classes... (Textinput.mcc)")
  134.            (help   "This will install some MUI classes needed by STFax")
  135.            (source "MUI/Textinput.mcc")
  136.            (dest   "MUI:Libs/MUI")
  137.            (confirm)
  138.     )
  139.  
  140.     (complete 70)
  141.  
  142.     (copylib
  143.            (prompt "Installing updated MUI classes... (Textinput.mcp)")
  144.            (help   "This will install some MUI classes needed by STFax")
  145.            (source "MUI/Textinput.mcp")
  146.            (dest   "MUI:Libs/MUI")
  147.            (confirm)
  148.     )
  149.  
  150.     (complete 85)
  151.  
  152.     (copylib
  153.            (prompt "Installing updated MUI classes... (Textinputscroll.mcc)")
  154.            (help   "This will install some MUI classes needed by STFax")
  155.            (source "MUI/Textinputscroll.mcc")
  156.            (dest   "MUI:Libs/MUI")
  157.            (confirm)
  158.     )
  159. )
  160.  
  161. (complete 90)
  162.  
  163. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  164. ;  End
  165. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  166.  
  167. (message @app-name " has been upgraded from version " OldVersion " to " NewVersion
  168.          "\n\nThe old STFax version has been renamed as STFax:STFax.old")
  169.  
  170. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  171. ;  All done.
  172. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  173.  
  174. (complete 100)
  175.  
  176.